package com.my.test.goods.ctrl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.my.test.common.JsonResult;
import com.my.test.goods.service.GoodsService;

@Controller
@RequestMapping("/api")
public class GoodsApiCtrl {

	@Autowired
	private GoodsService goodsService;
	
	@RequestMapping("/getGoodsByIds")
	@ResponseBody
	public JsonResult getGoodsByIds(String ids){
		JsonResult result = new JsonResult(JsonResult.ERROR_CODE,"error");
		result.setDate(goodsService.getGoodsByIds(ids));
		result.setRespCode(JsonResult.ERROR_CODE);
		return result;
	}
}
